/*
 * Copyright 2006 - 2007 - Chris Maki
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.theserverside.blog.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.ExcludeDefaultListeners;
import javax.persistence.Lob;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Embeddable
// any default entity listeners are not applied to this embedded entity
@ExcludeDefaultListeners
public class UserDetail {

    private String firstName;
    
    private String lastName;

    @Lob
    private String bio;
    
    @Temporal(TemporalType.DATE)
    @Column(name="DATE_OF_BIRTH")
    private Date dateOfBirth;

    @Column(name="LAST_LOGIN")
    @Temporal(TemporalType.TIMESTAMP)
    private Date lastLogin;    

    @Column(name="AVATAR")
    private String avatar;
    
    @Lob
    @Column(name="SIGNATURE")
    private String signature;
    
    @Column(name="EMAIL_ADDRESS", nullable=false, unique=true)
    private String emailAddress;
    
    @Column(name="PASSWORD_HINT_QUESTION")
    private String passwordHintQuestion;
    
    @Column(name="PASSWORD_HINT_ANSWER")
    private String passwordHintAnswer;

    public String getAvatar() {
        return avatar;
    }
    
    public String getBio() {
        return bio;
    }

    public Date getDateOfBirth() {
        return dateOfBirth;
    }    
    
    public String getEmailAddress() {
        return emailAddress;
    }
    public void setEmailAddress(String emailAddress) {
        this.emailAddress = emailAddress;
    }
    
    public String getFirstName() {
        return firstName;
    }
    public Date getLastLogin() {
        return lastLogin;
    }    
    public String getLastName() {
        return lastName;
    }    
    public String getPasswordHintAnswer() {
        return passwordHintAnswer;
    }
    public String getPasswordHintQuestion() {
        return passwordHintQuestion;
    }
    public String getSignature() {
        return signature;
    }
    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }
    public void setBio(String bio) {
        this.bio = bio;
    }
    public void setDateOfBirth(Date dateOfBirth) {
        this.dateOfBirth = dateOfBirth;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }
    public void setLastLogin(Date lastLogin) {
        this.lastLogin = lastLogin;
    }
    public void setLastName(String lastName) {
        this.lastName = lastName;
    }
    public void setPasswordHintAnswer(
            String passwordHintAnswer) {
        this.passwordHintAnswer = passwordHintAnswer;
    }
    public void setPasswordHintQuestion(
            String passwordHintQuestion) {
        this.passwordHintQuestion = passwordHintQuestion;
    }
    public void setSignature(String signature) {
        this.signature = signature;
    }
    
}
